package com.cat.dataStructure03;

import java.util.Arrays;

/**
*   @description https://leetcode.cn/problems/frog-jump-ii/
*   @author 曲大人的喵
*   @create 2025/11/7 20:49
*   @since JDK17
*/

public class Solution19 {
    public int maxJump(int[] stones) {
        int ans = stones[1] - stones[0], n = stones.length;
        for (int i = 2; i < n; i++) {
            ans = Math.max(ans, stones[i] - stones[i - 2]);
        }
        return ans;
    }
}
